// KnowledgePackageDTO.java
package com.example.gymlearning.dto;

import com.example.gymlearning.entity.KnowledgePoint;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class KnowledgePackageDTO {
    private Long id;
    private String name;
    private String description;
    private Long moduleId;
    private String moduleName;
    private Integer pointCount; // 包含知识点数量
    private Integer totalDuration; // 总时长 - 前端需要改为 totalDuration
    private Integer totalExperience; // 总经验值 - 前端需要改为 totalExperience
    private Integer beginnerPoints; // 初级知识点数量 - 前端需要改为 beginnerPoints
    private Integer intermediatePoints; // 中级知识点数量 - 前端需要改为 intermediatePoints
    private Integer advancedPoints; // 高级知识点数量 - 前端需要改为 advancedPoints
    private List<KnowledgePoint> knowledgePoints; // 知识点列表

    // 添加进度字段（如果没有的话）
    private Integer progress = 0; // 学习进度百分比，默认0

    // 为了方便前端使用，可以添加一些兼容性方法
    public Integer getDuration() {
        return totalDuration;
    }

    public Integer getExperience() {
        return totalExperience;
    }

    public Integer getBeginnerCount() {
        return beginnerPoints;
    }

    public Integer getIntermediateCount() {
        return intermediatePoints;
    }

    public Integer getAdvancedCount() {
        return advancedPoints;
    }
}